-
Notifications
You must be signed in to change notification settings - Fork 76
Benchmark improvements #2415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark improvements #2415
Conversation
benchmarks/CMakeLists.txt
Outdated
| endif() | ||
|
|
||
| find_package(Python3 COMPONENTS Interpreter) | ||
| find_package(Python 3.9 REQUIRED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why Python 3.9?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the minimum version of python that is requested. Do we support triton from 3.9?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I see, the syntax is a little bit confusing. Why we not specifying the upper end, for example 3.9...3.12?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we can, but do we want to keep it updating every new python release. I guess I'll update it just for find_package(Python3 REQUIRED. If any issue will appear - we can add restrictions later.
2ef5c79 to
8fe5f9f
Compare
245cea0 to
810be92
Compare
|
Pre-commit checks fails here, but not locally. I've added them to ignore list, but they are still appear in the CI. @pbchekin do you know what I'm missing? |
What is the ignore list? The complain is legit, distutils is deprecated, https://peps.python.org/pep-0632/#migration-advice. |
6b2f1c7 to
e4c05a5
Compare
I mean
Indeed. I've dig deeper in the setuptools source code - they vendor distutills. |
e4c05a5 to
d11b65d
Compare
|
Okay, using vendored distutil from setuptools should be done through Importing |
45cea57 to
cc6a5e2
Compare
|
|
||
| find_package(Python3 COMPONENTS Interpreter) | ||
| find_package(Python3 REQUIRED | ||
| COMPONENTS Development.Module) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need interpreter for cmake (like calling python scripts), but we need to compile python library.
You can find out more here: https://cmake.org/cmake/help/latest/module/FindPython.html
| XeTLA library from https://github.com/intel/xetla into | ||
| ${XeTLALibrary_SOURCE_DIR}") | ||
| file(READ xetla-library.conf XeTLALibrary_TAG) | ||
| file(READ xetla_kernel/xetla-library.conf XeTLALibrary_TAG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved library requirements to the top level cmake.
| os.path.dirname(__file__))) | ||
|
|
||
|
|
||
| class build_ext(_build_ext): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name does not match the class naming style. CamelCase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a class that overrides specific class of setuptools, so it kept that way to be consistent with the library.
@ZzEeKkAa could you highlight the new features at the top of this pull request? This will allow us to use them without reading the code :) |
|
|
||
| from setuptools import setup | ||
| # TODO: update once there is replacement for clean: | ||
| # https://github.com/pypa/setuptools/discussions/2838 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I read the discussion and it seems like it will never happen.
Should we just switch to pip install command instead of python setup.py install here:
| python setup.py install |
The replacement is described here: https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary
Moreover, the build env setup is usually up to the build front-end (pip or pypa/build, for example) and they often just create "throw-away" virtualenvs under /tmp that you wouldn't need to clean up
Given that pip creates a temporary folder and there is no need to clean it up, we can avoid using the deprecated API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm personally using setup.py as main tool. It also makes challenging to clean up when you build without isolation in pip.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other words, until they come up with a better approach on cleaning, I would prefer to keep this deprecated API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok for now, but most likely from everything I read, they can't provide such an API anymore, but delegate this task to other tools
anmyachev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f1b25a9 to
368ef37
Compare
I've picked up some useful changes from #1905 and pushed them here. Also organized python library build.
So basically it is a clean up with some features added and get it ready for the 2025 release
List of changes:
Closes #1905